package fts.ftscontrol;

import java.util.Collection;

import fts.ftsmonitoring.FileMonitoringRoot;
import fts.ftsmonitoring.IFileMonitoringService;


class MonitoringServiceThread implements Runnable
{
	IFileMonitoringService service;
	Collection<FileMonitoringRoot> roots;
	
	MonitoringServiceThread(IFileMonitoringService service, Collection<FileMonitoringRoot> roots)
	{
		System.out.println(Thread.currentThread().getStackTrace()[1]);

		this.service = service;
		this.roots = roots;
	}
	
	public void run()
	{
		System.out.println(Thread.currentThread().getStackTrace()[1]);

		try
		{
			service.startMonitoring(roots);
		}
		catch (InterruptedException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println(Thread.currentThread().getStackTrace()[1]);
	}

}
